const { loginCheck } = require('../controller/user')
const userRouter = (req, res) => {
  const method = req.method
  const path = req.path
  res.setHeader('Content-Type', 'application/json')
  if (method === 'post' && path === '/api/user/login') {
    const { userName, password } = req.body
    return loginCheck(userName, password)
  } else return false
}
module.exports = userRouter
